package com.ssh.crm.service.impl;


import org.springframework.transaction.annotation.Transactional;

import com.ssh.crm.dao.UserDao;
import com.ssh.crm.domain.User;
import com.ssh.crm.service.UserService;
import com.ssh.crm.utils.MD5Utils;

@Transactional
public class UserServiceImpl implements UserService {

	private UserDao userDao;
	
	public void setUserDao(UserDao userDao) {
		this.userDao=userDao;
	}
	
	public void regist(User user) {
		String pwd=MD5Utils.md5(user.getUserPassword());
		user.setUserPassword(pwd);
		user.setUserState("1");
		userDao.save(user);
	}

}
